$folderPath = "D:\BaiduNetdiskDownload\haitao_images_gz"

$allSubFolders = Get-ChildItem -Path $folderPath -Directory

foreach ($subFolder in $allSubFolders) {
    $fileCount = (Get-ChildItem -Path $subFolder.FullName -File).Count

    if ($fileCount -lt 6) {
        Write-Output "文件夹 $($subFolder.FullName) 中文件数为 $fileCount，少于 6 个文件。"
    }
}
